﻿using DemoQLKhoSX.Library;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Text;

namespace DemoQLKhoSX.DatabaseAccessLayer
{
    public class ThietKeDAO
    {
        private DBConnection conn;

        public ThietKeDAO()
        {
            conn = new DBConnection();
        }

        public DataTable searchByID(string id)
        {
            string query = string.Format("select * from TBL_ThietKe where IDMau = @id");
            SqlParameter[] sqlParameters = new SqlParameter[1];
            sqlParameters[0] = new SqlParameter("@id", SqlDbType.VarChar);
            sqlParameters[0].Value = Convert.ToString(id);
            return conn.executeSelectQuery(query, sqlParameters);
        }
    }
}
